Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Templating engine for Ryan/Reia
Retem provides a convenient syntax and a lot of features available out of the box:
* variables
* flow control
* filters
* i18n
* template nesting
== Usage
renderer = Retem.new()
template = renderer.parse("""Total {apples|count:~apples}
{for apple in apples} {apple.color apple.weight|kg} {end}""")
apples = [{~color: 'red', ~weight: 0.2}, {~color: 'yellow', ~weight: 0.15}]
renderer.render({~apples: apples})
=> Total 2 apples
.. red 0.2kg
.. yellow 0.15kg
There are a lot of templating examples in README on http://github.com/pirj/ryan/tree/master/src/retem